/*
 * @Author: szx
 * @Date: 2022-03-05 13:03:49
 * @LastEditTime: 2022-03-05 13:10:08
 * @Description:
 * @FilePath: \leetcode\1700-1799\1780\1780.js
 */
/**
 * @param {number} n
 * @return {boolean}
 */
var checkPowersOfThree = function (n) {
    while (n > 0) {
        if (n % 3 == 2) return false;
        n = Math.floor(n / 3);
    }
    return true;
};
